package com.test.jdk.streamApi;

import java.util.stream.Stream;

/**
 * concat 的使用
 */
public class StreamTestConcat {
    public static void main(String[] args) {

        //concat 流的合并
        // 创建一个Steam
        Stream<String> stringStream = Stream.of("1", "2", "3", "4", "6");
        Stream<String> stream2 = Stream.of("1", "2", "3", "4", "6");
        // 流的合并
        Stream.concat(stringStream,stream2).forEach(System.out::println);

    }


}
